3.303 \(\int \cos ^5(e+f x) (a+b \sec ^2(e+f x))^p \, dx\)

Optimal. Leaf size=103 \[ \frac{\sin (e+f x) \cos ^2(e+f x)^p \left (1-\frac{a \sin ^2(e+f x)}{a+b}\right )^{-p} F_1\left (\frac{1}{2};p-2,-p;\frac{3}{2};\sin ^2(e+f x),\frac{a \sin ^2(e+f x)}{a+b}\right ) \left (\sec ^2(e+f x) \left (-a \sin ^2(e+f x)+a+b\right )\right )^p}{f} \]

[Out]

(AppellF1[1/2, -2 + p, -p, 3/2, Sin[e + f*x]^2, (a*Sin[e + f*x]^2)/(a + b)]*(Cos[e + f*x]^2)^p*Sin[e + f*x]*(S
ec[e + f*x]^2*(a + b - a*Sin[e + f*x]^2))^p)/(f*(1 - (a*Sin[e + f*x]^2)/(a + b))^p)

________________________________________________________________________________________

Rubi [A]  time = 0.180578, antiderivative size = 124, normalized size of antiderivative = 1.2, number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.217, Rules used = {4148, 6722, 1974, 430, 429} \[ \frac{\sin (e+f x) \cos ^2(e+f x)^p \left (-a \sin ^2(e+f x)+a+b\right )^p \left (1-\frac{a \sin ^2(e+f x)}{a+b}\right )^{-p} \left (a \cos ^2(e+f x)+b\right )^{-p} \left (a+b \sec ^2(e+f x)\right )^p F_1\left (\frac{1}{2};p-2,-p;\frac{3}{2};\sin ^2(e+f x),\frac{a \sin ^2(e+f x)}{a+b}\right )}{f} \]

Antiderivative was successfully verified.

[In]

Int[Cos[e + f*x]^5*(a + b*Sec[e + f*x]^2)^p,x]

[Out]

(AppellF1[1/2, -2 + p, -p, 3/2, Sin[e + f*x]^2, (a*Sin[e + f*x]^2)/(a + b)]*(Cos[e + f*x]^2)^p*(a + b*Sec[e +
f*x]^2)^p*Sin[e + f*x]*(a + b - a*Sin[e + f*x]^2)^p)/(f*(b + a*Cos[e + f*x]^2)^p*(1 - (a*Sin[e + f*x]^2)/(a +
b))^p)

Rule 4148

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = Fr
eeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + b/(1 - ff^2*x^2)^(n/2))^p/(1 - ff^2*x^2)^((m + 1)/2), x
], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n/2] &&  !IntegerQ
[p]

Rule 6722

Int[(u_.)*((a_.) + (b_.)*(v_)^(n_))^(p_), x_Symbol] :> Dist[(a + b*v^n)^FracPart[p]/(v^(n*FracPart[p])*(b + a/
v^n)^FracPart[p]), Int[u*v^(n*p)*(b + a/v^n)^p, x], x] /; FreeQ[{a, b, p}, x] &&  !IntegerQ[p] && ILtQ[n, 0] &
& BinomialQ[v, x] &&  !LinearQ[v, x]

Rule 1974

Int[(u_)^(p_.)*(v_)^(q_.), x_Symbol] :> Int[ExpandToSum[u, x]^p*ExpandToSum[v, x]^q, x] /; FreeQ[{p, q}, x] &&
 BinomialQ[{u, v}, x] && EqQ[BinomialDegree[u, x] - BinomialDegree[v, x], 0] &&  !BinomialMatchQ[{u, v}, x]

Rule 430

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Dist[(a^IntPart[p]*(a + b*x^n)^F
racPart[p])/(1 + (b*x^n)/a)^FracPart[p], Int[(1 + (b*x^n)/a)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, n,
p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n, -1] &&  !(IntegerQ[p] || GtQ[a, 0])

Rule 429

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[a^p*c^q*x*AppellF1[1/n, -p,
 -q, 1 + 1/n, -((b*x^n)/a), -((d*x^n)/c)], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n
, -1] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])

Rubi steps

\begin{align*} \int \cos ^5(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx &=\frac{\operatorname{Subst}\left (\int \left (1-x^2\right )^2 \left (a+\frac{b}{1-x^2}\right )^p \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{\left (\cos ^2(e+f x)^p \left (b+a \cos ^2(e+f x)\right )^{-p} \left (a+b \sec ^2(e+f x)\right )^p\right ) \operatorname{Subst}\left (\int \left (1-x^2\right )^{2-p} \left (b+a \left (1-x^2\right )\right )^p \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{\left (\cos ^2(e+f x)^p \left (b+a \cos ^2(e+f x)\right )^{-p} \left (a+b \sec ^2(e+f x)\right )^p\right ) \operatorname{Subst}\left (\int \left (1-x^2\right )^{2-p} \left (a+b-a x^2\right )^p \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{\left (\cos ^2(e+f x)^p \left (b+a \cos ^2(e+f x)\right )^{-p} \left (a+b \sec ^2(e+f x)\right )^p \left (a+b-a \sin ^2(e+f x)\right )^p \left (1-\frac{a \sin ^2(e+f x)}{a+b}\right )^{-p}\right ) \operatorname{Subst}\left (\int \left (1-x^2\right )^{2-p} \left (1-\frac{a x^2}{a+b}\right )^p \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{F_1\left (\frac{1}{2};-2+p,-p;\frac{3}{2};\sin ^2(e+f x),\frac{a \sin ^2(e+f x)}{a+b}\right ) \cos ^2(e+f x)^p \left (b+a \cos ^2(e+f x)\right )^{-p} \left (a+b \sec ^2(e+f x)\right )^p \sin (e+f x) \left (a+b-a \sin ^2(e+f x)\right )^p \left (1-\frac{a \sin ^2(e+f x)}{a+b}\right )^{-p}}{f}\\ \end{align*}

Mathematica [B]  time = 17.5867, size = 1997, normalized size = 19.39 \[ \text{result too large to display} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Cos[e + f*x]^5*(a + b*Sec[e + f*x]^2)^p,x]

[Out]

(-3*(a + b)*AppellF1[1/2, 7/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Cos[e + f*x]^4*(a + 2*
b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2)^(-7/2 + p)*(a + b*Sec[e + f*x]^2)^p*Sin[e + f*x])/(f*(-3*(a + b)*Ap
pellF1[1/2, 7/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + (-2*b*p*AppellF1[3/2, 7/2, 1 - p,
5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 7*(a + b)*AppellF1[3/2, 9/2, -p, 5/2, -Tan[e + f*x]^2,
-((b*Tan[e + f*x]^2)/(a + b))])*Tan[e + f*x]^2)*((-3*(a + b)*AppellF1[1/2, 7/2, -p, 3/2, -Tan[e + f*x]^2, -((b
*Tan[e + f*x]^2)/(a + b))]*(a + 2*b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2)^(-5/2 + p))/(-3*(a + b)*AppellF1[
1/2, 7/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + (-2*b*p*AppellF1[3/2, 7/2, 1 - p, 5/2, -T
an[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 7*(a + b)*AppellF1[3/2, 9/2, -p, 5/2, -Tan[e + f*x]^2, -((b*Ta
n[e + f*x]^2)/(a + b))])*Tan[e + f*x]^2) + (6*a*(a + b)*p*AppellF1[1/2, 7/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Ta
n[e + f*x]^2)/(a + b))]*(a + 2*b + a*Cos[2*(e + f*x)])^(-1 + p)*(Sec[e + f*x]^2)^(-7/2 + p)*Sin[2*(e + f*x)]*T
an[e + f*x])/(-3*(a + b)*AppellF1[1/2, 7/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + (-2*b*p
*AppellF1[3/2, 7/2, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 7*(a + b)*AppellF1[3/2, 9/2,
 -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))])*Tan[e + f*x]^2) - (6*(a + b)*(-7/2 + p)*AppellF1[1/
2, 7/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*(a + 2*b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x
]^2)^(-7/2 + p)*Tan[e + f*x]^2)/(-3*(a + b)*AppellF1[1/2, 7/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/
(a + b))] + (-2*b*p*AppellF1[3/2, 7/2, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 7*(a + b)
*AppellF1[3/2, 9/2, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))])*Tan[e + f*x]^2) - (3*(a + b)*(a
+ 2*b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2)^(-7/2 + p)*Tan[e + f*x]*((2*b*p*AppellF1[3/2, 7/2, 1 - p, 5/2,
-Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/(3*(a + b)) - (7*AppellF1[3/2, 9/
2, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/3))/(-3*(a + b)*Appel
lF1[1/2, 7/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + (-2*b*p*AppellF1[3/2, 7/2, 1 - p, 5/2
, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 7*(a + b)*AppellF1[3/2, 9/2, -p, 5/2, -Tan[e + f*x]^2, -((
b*Tan[e + f*x]^2)/(a + b))])*Tan[e + f*x]^2) + (3*(a + b)*AppellF1[1/2, 7/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Ta
n[e + f*x]^2)/(a + b))]*(a + 2*b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2)^(-7/2 + p)*Tan[e + f*x]*(2*(-2*b*p*A
ppellF1[3/2, 7/2, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 7*(a + b)*AppellF1[3/2, 9/2, -
p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))])*Sec[e + f*x]^2*Tan[e + f*x] - 3*(a + b)*((2*b*p*Appel
lF1[3/2, 7/2, 1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/(3*(a +
 b)) - (7*AppellF1[3/2, 9/2, -p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f
*x])/3) + Tan[e + f*x]^2*(-2*b*p*((-6*b*(1 - p)*AppellF1[5/2, 7/2, 2 - p, 7/2, -Tan[e + f*x]^2, -((b*Tan[e + f
*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/(5*(a + b)) - (21*AppellF1[5/2, 9/2, 1 - p, 7/2, -Tan[e + f*x]^2
, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/5) + 7*(a + b)*((6*b*p*AppellF1[5/2, 9/2, 1 - p,
 7/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/(5*(a + b)) - (27*AppellF1[
5/2, 11/2, -p, 7/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/5))))/(-3*(a
+ b)*AppellF1[1/2, 7/2, -p, 3/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + (-2*b*p*AppellF1[3/2, 7/2,
1 - p, 5/2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))] + 7*(a + b)*AppellF1[3/2, 9/2, -p, 5/2, -Tan[e + f
*x]^2, -((b*Tan[e + f*x]^2)/(a + b))])*Tan[e + f*x]^2)^2))

________________________________________________________________________________________

Maple [F]  time = 0.939, size = 0, normalized size = 0. \begin{align*} \int \left ( \cos \left ( fx+e \right ) \right ) ^{5} \left ( a+b \left ( \sec \left ( fx+e \right ) \right ) ^{2} \right ) ^{p}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(f*x+e)^5*(a+b*sec(f*x+e)^2)^p,x)

[Out]

int(cos(f*x+e)^5*(a+b*sec(f*x+e)^2)^p,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \cos \left (f x + e\right )^{5}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^5*(a+b*sec(f*x+e)^2)^p,x, algorithm="maxima")

[Out]

integrate((b*sec(f*x + e)^2 + a)^p*cos(f*x + e)^5, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \cos \left (f x + e\right )^{5}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^5*(a+b*sec(f*x+e)^2)^p,x, algorithm="fricas")

[Out]

integral((b*sec(f*x + e)^2 + a)^p*cos(f*x + e)^5, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)**5*(a+b*sec(f*x+e)**2)**p,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \cos \left (f x + e\right )^{5}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^5*(a+b*sec(f*x+e)^2)^p,x, algorithm="giac")

[Out]

integrate((b*sec(f*x + e)^2 + a)^p*cos(f*x + e)^5, x)